/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package our.gui;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;

/**
 *
 * @author keysman
 */
public class classLogFormatter extends Formatter {
        public String format(LogRecord rec) {
            SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm");
            Date resultdate = new Date(rec.getMillis());
            System.out.println(sdf.format(resultdate));

            StringBuffer buf = new StringBuffer(1000);
            buf.append(sdf.format(resultdate));
            buf.append(' ');
            buf.append(rec.getLevel());
            buf.append(' ');
            buf.append(formatMessage(rec));
            buf.append('\n');
            return buf.toString();
        }
}
